<% content_for :form_content do %>

<div class="border rounded-md p-6 md:p-12 mb-8">
  <%= form_tag sessions_path, {novalidate: true} do %>
    <h1 class="font-bold text-lg mb-4">Sign in to Feedbin</h1>
    <%= render partial: "shared/flash", locals: {flash: flash} %>
    <div class="mb-4">
      <%= render Form::TextInputComponent.new do |text| %>
        <% text.label_content do %>
          <label for="email">Email</label>
        <% end %>
        <% text.input do %>
          <%= email_field_tag :email, params[:email], autofocus: true, tabindex: "1", class: "peer text-input dark:[color-scheme:dark]" %>
        <% end %>
      <% end %>
    </div>
    <div class="mb-8">
      <%= render Form::TextInputComponent.new do |text| %>
        <% text.label_content do %>
          <div class="flex items-center">
            <label for="password">Password</label>
            <%= link_to "Forgot your password?", new_password_reset_path, class: "ml-auto text-sm" %>
          </div>
        <% end %>
        <% text.input do %>
          <%= password_field_tag :password, nil, tabindex: "2", class: "text-input dark:[color-scheme:dark]" %>
        <% end %>
      <% end %>
    </div>

    <button type="submit" class="button flex w-full" tabindex="3">Sign In</button>
  <% end %>
</div>
<p class="text-center text-500">Start your free <%= Feedbin::Application.config.trial_days %>-day trial</p>
<p class="text-center"><%= link_to "Create an account", signup_path, class: "font-medium" %></p>
<% end %>

<%= render template: "layouts/form_page" %>
